<%@ page contentType="text/html;charset=UTF-8" %>
<%@ include file="/WEB-INF/views/include/taglib.jsp" %>
<html>
<head>
    <title>商品列表</title>
    <meta name="decorator" content="default"/>
    <script type="text/javascript">
        function page(n, s) {
            $("#pageNo").val(n);
            $("#pageSize").val(s);
            $("#searchForm").attr("action", "${ctx}/sys/CheckAllController/showProductList");
            $("#searchForm").submit();
            return false;
        }
    </script>
</head>
<sys:message content="${message}"/>
<body>
<ul class="nav nav-tabs">
    <li class="active"><a href="${ctx}/sys/CheckAllController/showProductList">商品列表</a></li>
</ul>
<form:form id="searchForm" modelAttribute="tbAgentProduct" action="${ctx}/sys/CheckAllController/showProductList"
           method="post" class="breadcrumb form-search">
    <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
    <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
    <label>商品名称：</label><form:input path="productName" htmlEscape="false" maxlength="50" class="input-medium"/>
    <label>代理商名称：</label><form:input path="agentName" htmlEscape="false" maxlength="50" class="input-medium"/>
    <label>商品类型：</label>
    <select id="box" name="reserveFlag" class="input-medium">
        <option value="-1">全部</option>
        <option value="4">便利生活</option>
        <option value="3">生活预订</option>
    </select>
    &nbsp;<input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
</form:form>
<sys:message content="${message}"/>
<span><font style="color: #00A6C7">${message1}</font></span>
<table id="contentTable" class="table table-striped table-bordered table-condensed">
    <thead>
        <tr>
            <th>代理商名称</th>
            <th>商品名称</th>
         <%--   <th>商品图片</th>--%>
            <th>商品类型</th>
         <%--   <th>条形码</th>--%>
            <th>属性</th>
            <th>单位</th>
          <%--  <th>是否维护库存</th>
            <th>是否可用物业钱包</th>
            <th>是否预售商品</th>--%>
            <th>单价</th>
            <th>库存</th>
         <%--   <th>操作</th>--%>
        </tr>
    </thead>
    <tbody>
    <c:forEach items="${page.list}" var="tbProduct">
        <tr>
            <td>${tbProduct.agentName}</td>
            <td>${tbProduct.productName}</td>
           <%-- <td>
                <a href="${tbProduct.img}" target="_blank">
                    <img width="100" height="80" src="${tbProduct.img}" >
                </a>
            </td>--%>
            <td>${tbProduct.reserveFlag}</td>
         <%--   <td>${tbProduct.barcode}</td>--%>
            <td>
                    ${tbProduct.attr}&nbsp;&nbsp;
            </td>
            <td>
                ${tbProduct.size}&nbsp;&nbsp;
            </td>
            <td>
                ${tbProduct.price}&nbsp;&nbsp;
            </td>
            <td>
                ${tbProduct.storeNum}&nbsp;&nbsp;
            </td>
           <%-- <td><c:if test="${tbProduct.isMaintainStoreNum==0}">否</c:if><c:if test="${tbProduct.isMaintainStoreNum==1}">是</c:if></td>
            <td><c:if test="${tbProduct.isUseMqWallet==0}">否</c:if><c:if test="${tbProduct.isUseMqWallet==1}">是</c:if></td>
            <td>
                <c:choose>
                    <c:when test="${tbProduct.reserveFlag==3}">是</c:when>
                    <c:otherwise>否</c:otherwise>
                </c:choose>
            </td>
            <td><fmt:formatDate value="${tbProduct.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/></td>--%>
          <%--  <td>
                <a href="${ctx}/sys/product/form?id=${tbProduct.id}">修改</a>
                <a href="${ctx}/sys/product/delete?id=${tbProduct.id}" onclick="return confirmx('确认要删除该商品吗？', this.href)">删除</a>
            </td>--%>
        </tr>
    </c:forEach>
    </tbody>
</table>
<div class="pagination">${page}</div>
</body>
</html>
